home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Developer & Web Development Tools / Inno Setup 5.2.3 / isetup-5.2.3.exe / {app} / Examples / UninstallCodeExample1.iss (.txt) < prev   
Encoding:
Inno Setup Script  |  2006-10-03  |  1.5 KB  |  37 lines

  1. ; -- UninstallCodeExample1.iss --
  2. ; This script shows various things you can achieve using a [Code] section for Uninstall
  3. [Setup]
  4. AppName=My Program
  5. AppVerName=My Program version 1.5
  6. DefaultDirName={pf}\My Program
  7. DefaultGroupName=My Program
  8. UninstallDisplayIcon={app}\MyProg.exe
  9. OutputDir=userdocs:Inno Setup Examples Output
  10. [Files]
  11. Source: "MyProg.exe"; DestDir: "{app}"
  12. Source: "MyProg.chm"; DestDir: "{app}"
  13. Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
  14. [Code]
  15. function InitializeUninstall(): Boolean;
  16. begin
  17.   Result := MsgBox('InitializeUninstall:' #13#13 'Uninstall is initializing. Do you really want to start Uninstall?', mbConfirmation, MB_YESNO) = idYes;
  18.   if Result = False then
  19.     MsgBox('InitializeUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK);
  20. procedure DeinitializeUninstall();
  21. begin
  22.   MsgBox('DeinitializeUninstall:' #13#13 'Bye bye!', mbInformation, MB_OK);
  23. procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
  24. begin
  25.   case CurUninstallStep of
  26.     usUninstall:
  27.       begin
  28.         MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall is about to start.', mbInformation, MB_OK)
  29.         // ...insert code to perform pre-uninstall tasks here...
  30.       end;
  31.     usPostUninstall:
  32.       begin
  33.         MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK);
  34.         // ...insert code to perform post-uninstall tasks here...
  35.       end;
  36.   end;
  37.